package ntd.util.frame.javacv.dahua;

import cn.hutool.core.date.DateUnit;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.log.StaticLog;
import ntd.util.frame.javacv.ai_fuming.JavaCvVideoRecord;

import java.io.IOException;

public class Test {
    public static void main(String[] args) throws IOException {
//        CameraBO.initCode("1006567");
//        Map<String,Object> map = new HashMap<>();
//        map.put("param","COD");
//        map.put("tspan",24);
//        map.put("data","{\"COD\":{\"1660406400000\":28.266,\"1660413600000\":23.986,\"1660420800000\":26.567,\"1660428000000\":23.818,\"1660435200000\":23.144,\"1660442400000\":21.838,\"1660449600000\":22.444,\"1660456800000\":24.49,\"1660471200000\":25.684,\"1660478400000\":79.554,\"1660485600000\":20.949,\"1660492800000\":18.814},\"氨氮\":{\"1660406400000\":3.218,\"1660413600000\":0.237,\"1660420800000\":0.161,\"1660428000000\":2.892,\"1660435200000\":1.639,\"1660442400000\":0.226,\"1660449600000\":0.062,\"1660456800000\":0.05,\"1660471200000\":0.02,\"1660478400000\":0.02,\"1660485600000\":0.201,\"1660492800000\":0.152},\"总磷\":{\"1660406400000\":0.332,\"1660413600000\":0.235,\"1660420800000\":0.275,\"1660428000000\":0.268,\"1660435200000\":0.214,\"1660442400000\":0.175,\"1660449600000\":0.162,\"1660456800000\":0.16,\"1660471200000\":0.174,\"1660478400000\":0.176,\"1660485600000\":0.168,\"1660492800000\":0.156}}");
//
//        String result =  HttpRequest.post("http://49.232.109.39:8008/Water_Predict").body(JSONUtil.toJsonStr(map),"application/json").execute().body();
//        StaticLog.info(result);

//        AiModelBean bean = new AiModelBean();
//       StaticLog.info(JSONUtil.toJsonStr(bean.getModelList()));

        StaticLog.info(StrUtil.toUnderlineCase("AlgaePerson"));



//       CameraBO.initCode("1dde41e15524418183f2c471ed528e2c");

        StaticLog.info(DateUtil.date()+"=="+DateUtil.between(DateUtil.parse("2022-08-31T10:08:01.000+08:00"),DateUtil.parse("2022-08-31 10:30:52"), DateUnit.SECOND));
//        ThreadUtil.execute(()-> {
//            try {
//                JavaCvVideoRecord.recordVideo("Person","15136761839-1dde41e15524418183f2c471ed528e2c-20220906114221-image.jpg");
//            } catch (FrameGrabber.Exception e) {
//                e.printStackTrace();
//            }
//        });

//        ThreadUtil.execute(()-> {
//            try {
//                JavaCvVideoRecord.recordVideo("Person","中辉纸业-6b221cb25a894d22826c213a2f0a2edc-20220831113122-image.jpg");
//            } catch (FrameGrabber.Exception e) {
//                e.printStackTrace();
//            }
//        });
//        ThreadUtil.execute(()-> {
//            try {
//                JavaCvVideoRecord.recordVideo("Person","东竹村采水点-88b5c7d256f54e8d85e365663b7fa909-20220831123122-image.jpg");
//            } catch (FrameGrabber.Exception e) {
//                e.printStackTrace();
//            }
//        });
    }
}
